package zuoye;

import java.util.Scanner;

public class zuoye6 {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		System.out.println("first number:");
		int begin=sc.nextInt();
		System.out.println("second number:");
		int end=sc.nextInt();
		
		if(begin<=end){
			for(int i=begin;i<=end;i++){
				if(i%7==0||i/100==7||i/10%10==7||i%10==7){
					System.out.println(i);
				}
			}
		}
	}

}
